package problems;

import interfaces.EulerProblemInterface;
import utility.PrimeGenerator;
import utility.ProblemSpecifics;

public class EulerProblem007 implements EulerProblemInterface {

	private static final int TARGET_INDEX = 10001;
	private ProblemSpecifics problemSpecifics;

	public EulerProblem007() {
		String problemStatement = "What is the 10 001st prime number?";
		problemSpecifics = new ProblemSpecifics(problemStatement);
	}

	public void solve() {
		PrimeGenerator primeGenerator = new PrimeGenerator();
		long result = primeGenerator.getXthPrimeNumber(TARGET_INDEX);
		problemSpecifics.setResultAndMarkSolved(result);
	}

	public long reportResult() {
		return problemSpecifics.reportResult();
	}

	public ProblemStatus reportStatus() {
		return new ProblemStatus(problemSpecifics.isSolved());
	}

	public String stateTheProblem() {
		return problemSpecifics.stateTheProblem();
	}
}
